﻿<Window x:Class="Hammer_store.Registration"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Hammer_store"
        mc:Ignorable="d"
        Height="800" 
        Width="450" 
        ResizeMode="NoResize" 
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        Icon="Resources/Images/logo2.png"
        Title="Hammer store (регистрация)">

    <Window.Resources>

        <!--** Кастомная кнопка "Плюс" **-->
        <Style x:Key="FocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background" Color="White"/>
        <SolidColorBrush x:Key="Button.Static.Border" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background" Color="WhiteSmoke"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Pressed.Background" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Pressed.Border" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
        <Style x:Key="CustomButtonPlus" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
            <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!--** Кастомная кнопка "Минус" **-->
        <Style x:Key="FocusVisual1">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background1" Color="White"/>
        <SolidColorBrush x:Key="Button.Static.Border1" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background1" Color="WhiteSmoke"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border1" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Pressed.Background1" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Pressed.Border1" Color="LimeGreen"/>
        <SolidColorBrush x:Key="Button.Disabled.Background1" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border1" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground1" Color="#FF838383"/>
        <Style x:Key="CustomButtonMinus" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
            <Setter Property="Background" Value="{StaticResource Button.Static.Background1}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border1}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border1}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border1}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border1}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground1}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!--** Кастомная кнопка "Назад" **-->
        <Style x:Key="FocusVisual2">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background2" Color="#FFDDDDDD"/>
        <SolidColorBrush x:Key="Button.Static.Border2" Color="#FF707070"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background2" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border2" Color="White"/>
        <SolidColorBrush x:Key="Button.Pressed.Background2" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Pressed.Border2" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Disabled.Background2" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border2" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground2" Color="#FF838383"/>
        <Style x:Key="CustomButtonBack" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual2}"/>
            <Setter Property="Background" Value="{StaticResource Button.Static.Background2}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border2}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background2}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border2}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background2}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border2}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background2}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border2}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground2}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!--** Кастомная кнопка "Готово" **-->
        <Style x:Key="FocusVisual3">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background13" Color="#FFDDDDDD"/>
        <SolidColorBrush x:Key="Button.Static.Border13" Color="#FF707070"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background3" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border3" Color="White"/>
        <SolidColorBrush x:Key="Button.Pressed.Background3" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Pressed.Border3" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Disabled.Background3" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border3" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground3" Color="#FF838383"/>
        <Style x:Key="CustomButtonReady" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual3}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background3}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border3}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background3}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border3}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background3}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border3}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground3}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Window.Resources>

    <!--** Добавление рамки с градиентом **-->
    <Border CornerRadius="5"
            BorderThickness="5">

        <!--* Установка цвета для рамки *-->
        <Border.BorderBrush>
            <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                <GradientStop Color="#FF661579" Offset="0.0"/>
                <GradientStop Color="#282c36" Offset="0.5"/>
                <GradientStop Color="#FF661579" Offset="1.0"/>
            </LinearGradientBrush>
        </Border.BorderBrush>

        <!--** Добавление сетки для элементов внутри формы **-->
        <Grid>

            <!--* Установка цвета для фона внутри "Grid" *-->
            <Grid.Background>
                <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                    <GradientStop Color="#FF661579" Offset="0.0"/>
                    <GradientStop Color="#282c36" Offset="0.5"/>
                    <GradientStop Color="#FF661579" Offset="1.0"/>
                </LinearGradientBrush>
            </Grid.Background>

            <!--* Разметка сетки для элементов *-->
            <Grid.RowDefinitions>
                <RowDefinition Height="35"/>
                <RowDefinition Height="70"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="85"/>
                <RowDefinition Height="110"/>
                <RowDefinition Height="70"/>
            </Grid.RowDefinitions>

            <!--* Тайтл Бар для кнопок и перетаскивания *-->
            <Grid Name="TitleBar" 
                  Grid.Row="0"
                  MouseDown="TitleBar_MouseDown"
                  Background="Transparent">

                <!--Изображение для закрытия формы-->
                <Image x:Name="Image_cross"
                       Width="35"
                       Height="35"
                       HorizontalAlignment="Right"
                       Margin="0 0 0 0"
                       MouseDown="Image_cross_MouseDown">
                    
                    <Image.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Image.Effect>

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/cross_NotActivate.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_cross}" 
                                             Value="True">
                                    <Setter Property="Source" Value="Resources/Images/cross_Activate.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

                <!--Изображение для сворачивания формы-->
                <Image x:Name="Image_colapso"
                       Width="25"
                       Height="25"
                       HorizontalAlignment="Right"
                       Margin="0 0 40 0"
                       MouseDown="Image_colapso_MouseDown">
                    <Image.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Image.Effect>

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/colapsoOne.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_colapso}"
                                             Value="True">
                                    <Setter Property="Source" Value="Resources/Images/colapsoTwo.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

            </Grid>

            <!--* Заголовок для названия формы *-->
            <Grid Name="Header" 
                  Grid.Row="1">

                <!--Метка заголовка-->
                <Label Content="Регистрация" 
                       HorizontalAlignment="Center"
                       Foreground="Black" 
                       FontFamily="Fregat" 
                       FontSize="40"
                       Height="50"
                       Background="White">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                        
                    </Label.Resources>
                    <Label.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Label.Effect>

                </Label>

            </Grid>

            <!--* Часть для логина *-->
            <Grid Name="FieldLogin" 
                  Grid.Row="2">

                <!--Метка логин-->
                <Label Content="Логин" 
                       VerticalAlignment="Top"
                       HorizontalAlignment="Left" 
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80,0,0,0"/>

                <!--Поле ввода логина-->
                <TextBox x:Name="textBox_InputLogin" 
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Width="280" 
                         Height="40" 
                         Margin="80,0,0,10"
                         Padding="3,5,3,3" 
                         FontSize="25" 
                         FontFamily="Fregat" 
                         Visibility="Visible" 
                         BorderBrush="{x:Null}" 
                         SelectionBrush="#FF9A00D7"
                         BorderThickness="3,3,3,3"
                         TabIndex="0" 
                         Grid.ColumnSpan="2"
                         GotFocus="textBox_InputLogin_GotFocus" 
                         LostFocus="textBox_InputLogin_LostFocus">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5" />
                        </Style>
                        
                    </TextBox.Resources>
                    <TextBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </TextBox.Effect>

                </TextBox>

                <!--Уведомления о неправильном логине-->
                <Label x:Name="labelErrorMessageOne_Login"
                       Content="Ошибка. В начале не может быть числа!"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Background="Gray"
                       Foreground="White"
                       FontFamily="Fregat"
                       Margin="0 0 40 0"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageTwo_Login"
                       Content="Ошибка. В начале не может быть спец. символа!"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Margin="0 0 5 0"
                       Background="Gray"
                       Foreground="White"
                       FontFamily="Fregat"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageThree_Login"
                       Content="Ошибка. Такое имя уже существует!"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Margin="0 0 40 0"
                       Foreground="White"
                       Background="Gray"
                       FontFamily="Fregat"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageFour_Login"
                       Content="Длина логина не может быть меньше 4 символов!"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Margin="0 0 5 0"
                       Foreground="White"
                       Background="Gray"
                       FontFamily="Fregat"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageFive_Login"
                       Content="Ошибка. В логине не должны быть пробелы!"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Margin="0 0 20 0"
                       Background="Gray"
                       Foreground="White"
                       FontFamily="Fregat"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Login"
                         Width="50" 
                         Height="50"
                         HorizontalAlignment="Right"
                         VerticalAlignment="Top"
                         Margin="0 -15 170 0"
                         Fill="Gray"  
                         Points="15,35, 35,35 25,45"
                         Visibility="Hidden"/>

            </Grid>

            <!--* Часть для почты *-->
            <Grid Name="FieldEmail"
                  Grid.Row="3">

                <!--Метка почта-->
                <Label Content="Почта" 
                       VerticalAlignment="Top"
                       HorizontalAlignment="Left"
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 0 0 0"/>

                <!--Поле ввода почты-->
                <TextBox x:Name="textBox_InputMail"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="80 0 0 10"
                         Width="280" 
                         Height="40" 
                         UndoLimit="12"
                         Padding="3,5,3,3" 
                         FontFamily="Fregat" 
                         FontSize="25" 
                         BorderBrush="{x:Null}"
                         BorderThickness="3" 
                         SelectionBrush="#FF9A00D7"
                         TabIndex="1"
                         LostFocus="textBox_InputMail_LostFocus" 
                         GotFocus="textBox_InputMail_GotFocus">

                    <TextBox.Resources>
                        <Style TargetType="{x:Type Border}">
                            <Setter Property="CornerRadius" Value="5" />
                        </Style>
                    </TextBox.Resources>
                    <TextBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </TextBox.Effect>

                </TextBox>

                <!--Уведомления о неверно введенной почте-->
                <Label x:Name="labelErrorMessageOne_Mail"
                   Content="Ошибка. Неверный формат почты!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 40 0"
                   Background="Gray"
                   Foreground="White"
                   FontFamily="Fregat"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageTwo_Mail"
                   Content="Данная почта уже существует"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 40 0"
                   Background="Gray"
                   Foreground="White"
                   FontFamily="Fregat"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Mail"
                     Width="50" 
                     Height="50"
                     HorizontalAlignment="Right"
                     VerticalAlignment="Top"
                     Margin="0 -15 170 0"
                     Fill="Gray" 
                     Points="15,35, 35,35 25,45"
                     Visibility="Hidden"/>

            </Grid>


            <!--* Часть для пароля *-->
            <Grid Name="FieldPassword1"
                  Grid.Row="4">

                <!--Метка пароль-->
                <Label Content="Пароль" 
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top"
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 -3 0 0"/>

                <!--Поле ввода пароля-->
                <PasswordBox x:Name="passwordBox_InputPass1"
                             HorizontalAlignment="Left"
                             VerticalAlignment="Bottom"
                             Margin="80 0 0 10"
                             Width="280" 
                             Height="40"
                             Padding="3,3,41,3" 
                             FontFamily="Fregat" 
                             FontSize="25"
                             BorderBrush="{x:Null}"
                             BorderThickness="3"
                             SelectionBrush="#FF9A00D7"
                             TabIndex="2" 
                             PasswordChar="●"
                             LostFocus="passwordBox_InputPass1_LostFocus"
                             GotFocus="passwordBox_InputPass1_GotFocus">
                    
                    <PasswordBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </PasswordBox.Effect>

                    <PasswordBox.Style>
                        <Style TargetType="{x:Type PasswordBox}">
                            <Style.Resources>
                                <Style TargetType="Border">
                                    <Setter Property="CornerRadius" Value="5" />
                                </Style>
                            </Style.Resources>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type PasswordBox}">
                                        <Border x:Name="border" 
                                                CornerRadius="5" 
                                                BorderBrush="{TemplateBinding BorderBrush}" 
                                                BorderThickness="{TemplateBinding BorderThickness}" 
                                                Background="{TemplateBinding Background}" 
                                                SnapsToDevicePixels="True">
                                            <ScrollViewer x:Name="PART_ContentHost" 
                                                          Focusable="false" 
                                                          HorizontalScrollBarVisibility="Hidden" 
                                                          VerticalScrollBarVisibility="Hidden"/>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsEnabled" 
                                                     Value="false">
                                                <Setter Property="Opacity" 
                                                        TargetName="border" 
                                                        Value="0.56"/>
                                            </Trigger>
                                            <Trigger Property="IsMouseOver" 
                                                     Value="true">
                                                <Setter Property="BorderBrush" 
                                                        TargetName="border" 
                                                        Value="#FF7EB4EA"/>
                                            </Trigger>
                                            <Trigger Property="IsKeyboardFocused" 
                                                     Value="true">
                                                <Setter Property="BorderBrush" 
                                                        TargetName="border" 
                                                        Value="#FF569DE5"/>
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsInactiveSelectionHighlightEnabled" 
                                                   Value="true"/>
                                        <Condition Property="IsSelectionActive" 
                                                   Value="false"/>
                                    </MultiTrigger.Conditions>
                                    <Setter Property="SelectionBrush" 
                                            Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
                                </MultiTrigger>
                            </Style.Triggers>
                        </Style>
                    </PasswordBox.Style>
                </PasswordBox>

                <!--TextBox для отображения пароля-->
                <TextBox x:Name="textBox_OutputPass1"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="80 0 0 10"
                         Width="280" 
                         Height="40"
                         Padding="3,5,41,3"
                         FontFamily="Fregat" 
                         FontSize="25"  
                         BorderBrush="{x:Null}"
                         BorderThickness="3"
                         SelectionBrush="#FF9A00D7"
                         Visibility="Hidden">

                    <TextBox.Resources>
                        <Style TargetType="{x:Type Border}">
                            <Setter Property="CornerRadius" Value="5" />
                        </Style>
                    </TextBox.Resources>

                </TextBox>

                <!--Глаз для скрытия пароля-->
                <Image x:Name="Image_EyeHide1"
                       Width="35"
                       Height="35"
                       Margin="322,38,83,12"
                       MouseDown="Image_EyeHide1_MouseDown"
                       Visibility="Visible">

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/eye_hideBlack.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeHide1}"
                                         Value="True">
                                    <Setter Property="Source" Value="Resources/Images/eye_hideGreen.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

                <!--Глаз для отображения пароля-->
                <Image x:Name="Image_EyeVisible1"
                   Width="35"
                   Height="35"
                   Margin="322,38,83,12"
                   MouseDown="Image_EyeVisible1_MouseDown"
                   Visibility="Hidden">

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/eye_visibleBlack.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeVisible1}"
                                     Value="True">
                                    <Setter Property="Source" Value="Resources/Images/eye_visibleGreen.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

                <!--Уведомления о неверно введенном пароле-->
                <Label x:Name="labelErrorMessageOne_Pass1"
                   Content="В пароле присутствует кириллица"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Background="Gray"
                   Margin="0 0 50 0"
                   FontFamily="Fregat"
                   Foreground="White"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageTwo_Pass1"
                   Content="Ошибка. Длина пароля меньше 7 символов!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 10 0"
                   FontSize="12"
                   Background="Gray"
                   Foreground="White"
                   FontFamily="Fregat"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageThree_Pass1"
                   Content="Ошибка. В пароле не должны быть пробелы!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 10 0"
                   FontSize="12"
                   Background="Gray"
                   Foreground="White"
                   FontFamily="Fregat"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Pass1"
                     Width="50" 
                     Height="50"
                     HorizontalAlignment="Right"
                     VerticalAlignment="Top"
                     Margin="0 -15 170 0"
                     Fill="Gray" 
                     Points="15,35, 35,35 25,45"
                     Visibility="Hidden"/>

            </Grid>


            <!--* Часть для повторного пароля *-->
            <Grid Name="FieldPassword2"
                  Grid.Row="5">

                <!--Метка повторите пароль-->
                <Label Content="Повторите пароль" 
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top" 
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 -3 0 0"/>

                <!--Поле для ввода повторного пароля-->
                <PasswordBox x:Name="passwordBox_InputPass2"
                             HorizontalAlignment="Left"
                             VerticalAlignment="Bottom"
                             Margin="80 0 0 10"
                             Width="280" 
                             Height="40"
                             Padding="3,3,41,3" 
                             FontFamily="Fregat" 
                             FontSize="25" 
                             BorderBrush="{x:Null}"
                             BorderThickness="3" 
                             SelectionBrush="#FF9A00D7"
                             TabIndex="3" 
                             PasswordChar="●"
                             LostFocus="passwordBox_InputPass2_LostFocus"
                             GotFocus="passwordBox_InputPass2_GotFocus">
                    
                    <PasswordBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </PasswordBox.Effect>

                    <PasswordBox.Style>
                        <Style TargetType="{x:Type PasswordBox}">
                            <Style.Resources>
                                <Style TargetType="Border">
                                    <Setter Property="CornerRadius" 
                                            Value="5" />
                                </Style>
                            </Style.Resources>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type PasswordBox}">
                                        <Border x:Name="border" 
                                                CornerRadius="5" 
                                                BorderBrush="{TemplateBinding BorderBrush}" 
                                                BorderThickness="{TemplateBinding BorderThickness}" 
                                                Background="{TemplateBinding Background}" 
                                                SnapsToDevicePixels="True">
                                            <ScrollViewer x:Name="PART_ContentHost" 
                                                          Focusable="false" 
                                                          HorizontalScrollBarVisibility="Hidden" 
                                                          VerticalScrollBarVisibility="Hidden"/>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsEnabled" 
                                                     Value="false">
                                                <Setter Property="Opacity" 
                                                        TargetName="border" 
                                                        Value="0.56"/>
                                            </Trigger>
                                            <Trigger Property="IsMouseOver" 
                                                     Value="true">
                                                <Setter Property="BorderBrush" 
                                                        TargetName="border" 
                                                        Value="#FF7EB4EA"/>
                                            </Trigger>
                                            <Trigger Property="IsKeyboardFocused" 
                                                     Value="true">
                                                <Setter Property="BorderBrush" 
                                                        TargetName="border" 
                                                        Value="#FF569DE5"/>
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsInactiveSelectionHighlightEnabled" 
                                                   Value="true"/>
                                        <Condition Property="IsSelectionActive" 
                                                   Value="false"/>
                                    </MultiTrigger.Conditions>
                                    <Setter Property="SelectionBrush" 
                                            Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
                                </MultiTrigger>
                            </Style.Triggers>
                        </Style>
                    </PasswordBox.Style>
                    
                </PasswordBox>

                <!--TextBox для отображения повторного пароля-->
                <TextBox x:Name="textBox_OutputPass2"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="80 0 0 10"
                         Width="280" 
                         Height="40"
                         Padding="3,5,41,3"
                         FontFamily="Fregat"
                         FontSize="25"
                         BorderBrush="{x:Null}"
                         BorderThickness="3"
                         SelectionBrush="#FF9A00D7"
                         Visibility="Hidden">

                    <TextBox.Resources>
                        <Style TargetType="{x:Type Border}">
                            <Setter Property="CornerRadius" Value="5" />
                        </Style>
                    </TextBox.Resources>

                </TextBox>

                <!--Глаз для скрытия повторного пароля-->
                <Image x:Name="Image_EyeHide2"
                       Width="35"
                       Height="35" 
                       Margin="322,38,83,12"
                       MouseDown="Image_EyeHide2_MouseDown"
                       Visibility="Visible">

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/eye_hideBlack.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeHide2}"
                                     Value="True">
                                    <Setter Property="Source" Value="Resources/Images/eye_hideGreen.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

                <!--Глаз для отображения повторного пароля-->
                <Image x:Name="Image_EyeVisible2"
                       Width="35"
                       Height="35"
                       Margin="322,38,83,12"
                       MouseDown="Image_EyeVisible2_MouseDown"
                       Visibility="Hidden">

                    <Image.Style>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Resources/Images/eye_visibleBlack.png"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeVisible2}"
                                     Value="True">
                                    <Setter Property="Source" Value="Resources/Images/eye_visibleGreen.png"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>

                <!--Уведомление: Пароль не совпадает-->
                <Label x:Name="labelErrorMessage_Pass2"
                       Content="?"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top"
                       Margin="50 38 0 0"
                       Foreground="White"
                       
                       FontFamily="Fregat"
                       BorderBrush="Red"
                       BorderThickness="2"
                       FontSize="20"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

            </Grid>

            <!--* Часть для имени *-->
            <Grid Name="FieldName"
                  Grid.Row="6">

                <!--Метка имя-->
                <Label Content="Имя" 
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top"
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 0 0 0"/>

                <!--Поле ввода имени-->
                <TextBox x:Name="textBox_Input_FName" 
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="80 0 0 10"
                         Width="280" 
                         Height="40" 
                         Padding="3,5,3,3" 
                         FontFamily="Fregat" 
                         FontSize="25"
                         BorderBrush="{x:Null}"
                         BorderThickness="3"
                         SelectionBrush="#FF9A00D7" 
                         LostFocus="textBox_Input_FName_LostFocus" 
                         GotFocus="textBox_Input_FName_GotFocus"
                         KeyDown="textBox_Input_FName_KeyDown"
                         TabIndex="4">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="5" />
                        </Style>
                        
                    </TextBox.Resources>
                    <TextBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </TextBox.Effect>

                </TextBox>

                <!--Уведомление о неверном имени-->
                <Label x:Name="labelErrorMessageOne_Name"
                   Content="Имя не может быть меньше 3 букв!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 30 0"
                   Background="Gray"
                   Foreground="White"
                   FontFamily="Fregat"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageTwo_Name"
                   Content="Ошибка. Необходимо убрать пробелы!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Background="Gray"
                   Margin="0 0 30 0"
                   Foreground="White"
                   FontFamily="Fregat"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Name"
                     Width="50"
                     Height="50"
                     HorizontalAlignment="Right"
                     VerticalAlignment="Top"
                     Margin="0 -15 170 0"
                     Fill="Gray"
                     Points="15,35, 35,35, 25,45"
                     Visibility="Hidden"/>

            </Grid>

            <!--* Часть для фамилии *-->
            <Grid Name="FieldSurname"
                  Grid.Row="7">

                <!--Метка фамилия-->
                <Label Content="Фамилия" 
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top"
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 0 0 0"/>

                <!--Поле ввода фамилии-->
                <TextBox x:Name="textBox_Input_LName" 
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="80 0 0 10"
                         Width="280" 
                         Height="40" 
                         Padding="3,5,3,3"
                         FontFamily="Fregat" 
                         FontSize="25"
                         BorderBrush="{x:Null}"
                         BorderThickness="3"
                         SelectionBrush="#FF9A00D7" 
                         LostFocus="textBox_Input_LName_LostFocus" 
                         GotFocus="textBox_Input_LName_GotFocus"
                         KeyDown="textBox_Input_LName_KeyDown"
                         TabIndex="5">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="5" />
                        </Style>
                        
                    </TextBox.Resources>
                    <TextBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </TextBox.Effect>

                </TextBox>

                <!--Уведомление о неверной фамилии-->
                <Label x:Name="labelErrorMessageOne_Surname"
                   Content="Фамилия не может быть меньше 3 букв"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Background="Gray"
                   Margin="0 0 10 0"
                   Foreground="White"
                   FontFamily="Fregat"
                   FontSize="12"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Label x:Name="labelErrorMessageTwo_Surname"
                   Content="Ошибка. Необходимо убрать пробелы!"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 10 0"
                   Background="Gray"
                   Foreground="White"
                   FontSize="12"
                   FontFamily="Fregat"
                   Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Surname"
                     Width="50"
                     Height="50"
                     HorizontalAlignment="Right"
                     VerticalAlignment="Top"
                     Margin="0 -15 170 0"
                     Fill="Gray"
                     Points="15,35, 35,35, 25,45"
                     Visibility="Hidden"/>

            </Grid>

            <!--* Часть для возраста *-->
            <Grid Name="FieldAge"
                  Grid.Row="8">

                <!--Метка возраст-->
                <Label Content="Возраст" 
                       HorizontalAlignment="Left" 
                       VerticalAlignment="Top"
                       FontFamily="Fregat"
                       Foreground="White" 
                       FontSize="30" 
                       Margin="80 -5 0 0"/>

                <!--Поле ввода возраста-->
                <TextBox x:Name="textBox_InputAge" 
                         HorizontalAlignment="Left"
                         VerticalAlignment="Top"
                         Width="120" 
                         Height="40" 
                         Margin="80 35 0 10"
                         Padding="3,5,3,3" 
                         FontFamily="Fregat" 
                         FontSize="25" 
                         BorderBrush="LimeGreen"
                         BorderThickness="3"
                         Text="18"
                         SelectionBrush="#FF9A00D7" 
                         KeyDown="textBox_InputAge_KeyDown"
                         GotFocus="textBox_InputAge_GotFocus" 
                         LostFocus="textBox_InputAge_LostFocus"
                         KeyUp="textBox_InputAge_KeyUp"
                         TabIndex="6">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="5 0 0 5" />
                        </Style>
                        
                    </TextBox.Resources>
                    <TextBox.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </TextBox.Effect>

                </TextBox>

                <!--Первая кнопка для повышения возраста-->
                <Button Style="{DynamicResource CustomButtonPlus}" 
                        x:Name="buttonUp" 
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top" 
                        FontFamily="Fregat"
                        Foreground="Black" 
                        FontSize="30" 
                        Content="+"
                        Height="40"
                        Width="30"
                        Margin="-5 35 0 10" 
                        BorderThickness="3"
                        BorderBrush="Gray"
                        Click="buttonUp_Click"
                        TabIndex="7">
                    
                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>
                </Button>

                <!--Вторая кнопка для понижения возраста-->
                <Button Style="{DynamicResource CustomButtonMinus}" 
                        x:Name="buttonDown" 
                        HorizontalAlignment="Center" 
                        VerticalAlignment="Top"
                        FontFamily="Fregat"
                        Foreground="Black" 
                        FontSize="35" 
                        Content="-" 
                        Height="40"
                        Width="30"
                        Margin="60 35 0 10" 
                        BorderThickness="3"
                        BorderBrush="Gray"
                        Click="buttonDown_Click"
                        TabIndex="8">

                    <Button.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="0 5 5 0"/>
                        </Style>
                    </Button.Resources>
                    
                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>

                </Button>

                <!--Уведомление о неверном вводе возраста-->
                <Label x:Name="labelErrorMessage_Age"
                       Content="Возраст указывается от 6 до 90 лет!"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Bottom"
                       Margin="30 0 0 0"
                       Foreground="White"
                       Background="Gray"
                       FontFamily="Fregat"
                       FontSize="12"
                       Visibility="Hidden">

                    <Label.Resources>
                        <Style TargetType= "Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>

                </Label>

                <Polygon x:Name="ErrorMessagePolygon_Age"
                         Width="50"
                         Height="50"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Margin="90,0,0,-15"
                         Fill="Gray"
                         Points="15,35, 35,35, 25,45"
                         RenderTransformOrigin="0.5,0.5"
                         Visibility="Hidden">

                    <Polygon.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform Angle="180.132"/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Polygon.RenderTransform>

                </Polygon>

            </Grid>

            <!--* Часть для основных кнопок *-->
            <Grid Name="BaseButtons"
                  Grid.Row="9">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="44*"/>
                    <ColumnDefinition Width="103*"/>
                </Grid.ColumnDefinitions>

                <!--* Кнопка Готово *-->
                <Button Style="{DynamicResource CustomButtonReady}" 
                        x:Name="button_ready" 
                        HorizontalAlignment="Left" 
                        VerticalAlignment="Center"
                        Height="40" 
                        Width="92" 
                        Content="Готово"
                        Foreground="White" 
                        FontSize="20" 
                        Margin="94,0,0,0" 
                        BorderThickness="3"
                        FontFamily="Fregat"
                        BorderBrush="Gray"
                        Click="button_ready_Click"
                        Grid.Column="1"
                        TabIndex="9">

                    <Button.Background>
                        <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                            <GradientStop Color="#282c36" Offset="0.0"/>
                            <GradientStop Color="#FF661579" Offset="0.5"/>
                            <GradientStop Color="#282c36" Offset="1.0"/>
                        </LinearGradientBrush>
                    </Button.Background>

                    <Button.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                Value="5"/>
                        </Style>
                        
                    </Button.Resources>
                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>

                </Button>

                <!--* Кнопка Назад *-->
                <Button Style="{DynamicResource CustomButtonBack}" 
                        x:Name="button_backOnUserVerification" 
                        HorizontalAlignment="Left" 
                        VerticalAlignment="Center"
                        Height="40" 
                        Width="90" 
                        Content="Назад"
                        Foreground="White"
                        BorderThickness="3"
                        FontSize="20"
                        FontFamily="Fregat"
                        BorderBrush="Gray"
                        Click="button_backOnUserVerification_Click"
                        TabIndex="10" Margin="126,0,0,0" Grid.ColumnSpan="2">

                    <Button.Background>
                        <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                            <GradientStop Color="#282c36" Offset="0.0"/>
                            <GradientStop Color="#FF661579" Offset="0.5"/>
                            <GradientStop Color="#282c36" Offset="1.0"/>
                        </LinearGradientBrush>
                    </Button.Background>

                    <Button.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                Value="5"/>
                        </Style>
                        
                    </Button.Resources>
                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>

                </Button>

            </Grid>

        </Grid>

    </Border>
</Window>
